<!--
var imgPath = "http://192.168.0.52/esb2c/proimg/";
/*
========================
========================
cookie
========================
*/
activeCookie = true;
if(document.cookie==null){
	//alert("cookie没有开启！");
	 activeCookie = false;
}

function getCookie(name) {
    if( !activeCookie  ) return;
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');

	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function setCookie(name , value)
{
    if( !activeCookie) return;
	var expdate = new Date();
	expdate.setTime(expdate.getTime() + (365*24*120));
	document.cookie=""+ name + "=" + value +";expires="+ expdate.toGMTString();
}
/*
========================
========================
取Request参数
========================
*/
Request = {
	QueryString : function(item){
		var svalue = location.search.match(new RegExp("[\?\&]" + item + "=([^\&]*)(\&?)","i"));
		return svalue ? svalue[1] : svalue;
	}
}
/*
========================
========================
div
========================
*/

function creatediv(id,left,top,width,height,alpha,index,htmlDiv){

	var doc=document;
	var p = doc.createElement("div");

	p.id = "DIV_"+id;
	p.style.position = "absolute";
	p.style.setAttribute("left",left+"px");
	p.style.setAttribute("top",top+"px");
	p.style.setAttribute("width",width+"px");
	p.style.setAttribute("height",height+"px");

	p.style.setAttribute("border","0 solid");
	p.style.setAttribute("filter","alpha(opacity="+alpha+")");
	p.style.setAttribute("z-index",index);
	p.innerHTML = htmlDiv;

	document.body.appendChild(p);
}

function removediv(id){
	document.body.removeChild(id2e("DIV_"+id));
}
/*
========================
========================
通用函数 
written by karas
========================
*/
//get element
function id2e(id)
{
	return document.getElementById(id);
}

function btndown(event,obj)
{
	if (!event)
	{
		var event = window.event;
	}
	window.alert(obj.marginTop);
}

function s_focus(target)
{
	if (id2e(target))
	{
		id2e(target).focus();
	}
}


function getQueryVars(name)
{
var loc = replaceAll(location.href,'%5e','^');
loc = replaceAll(loc,'%5E','^')
var arr = loc.match(new RegExp("(?:\\?|&|\\^|#)"+name+"(?:\\^|=)([^\\^&\\.#]*)"));
if (arr !=null)
	{
		return unescape(arr[1]);
	}
else
	{
		return false;
	}
}
function getDomain(name){
	var arr = location.href.match(new RegExp("^(?:http://)?(.+?)/"));
	if (arr !=null){
		arr[1] = unescape(arr[1]);
		return arr[1].toLowerCase();
	}else{
		return null;
	}
}

function transPut(str){
	var st = str;
	st = replaceAll(st,"^","^3$");
	st = replaceAll(st,",","^5$");
	st = replaceAll(st,"-","^0$");
	st = replaceAll(st,"'","^1$");
	st = replaceAll(st,"%","^2$");
	st = replaceAll(st,"&","^4$");
	
	return st;
}

function transGet(str){
	var st = str;
	st = replaceAll(st,"^2$","%");
	st = replaceAll(st,"^1$","'");
	st = replaceAll(st,"^5$",",");
	st = replaceAll(st,"^0$","-");
	st = replaceAll(st,"^4$","&");
	st = replaceAll(st,"^3$","^");
	return st;
}

function replaceAll (streng, soeg, erstat)
{
	var st = streng;
	if (soeg.length == 0){
			return st;
	}
	var idx = st.indexOf(soeg);
	while (idx >= 0){
		st = st.substring(0,idx) + erstat + st.substr(idx+soeg.length);
		idx = st.indexOf(soeg,idx+erstat.length);
	}
	return st;
}


function FormatNumber(srcStr,nAfterDot){
	var srcStr,nAfterDot;
	var resultStr,nTen;
	srcStr = ""+srcStr+"";
	strLen = srcStr.length;
	dotPos = srcStr.indexOf(".",0);
	if (dotPos == -1){
		resultStr = srcStr+".";
		for (i=0;i<nAfterDot;i++){
			resultStr = resultStr+"0";
		}
	} else{
		if ((strLen - dotPos - 1) >= nAfterDot){
			nAfter = dotPos + nAfterDot + 1;
			nTen =1;
			for(j=0;j<nAfterDot;j++){
				nTen = nTen*10;
			}
			resultStr = Math.round(parseFloat(srcStr)*nTen)/nTen;
		}
		else{
			resultStr = srcStr;
			for (i=0;i<(nAfterDot - strLen + dotPos + 1);i++){
				resultStr = resultStr+"0";
			}
		}
	}

	if(dotPos == 0) resultStr = "0"+ resultStr;
	return resultStr;
}

function IsDigit()
{
 return (((event.keyCode >= 48) && (event.keyCode <= 57))||((event.keyCode >= 65) && (event.keyCode <= 90))||((event.keyCode >= 97) && (event.keyCode <= 122))||(event.keyCode >= 128));
 // return ((event.keyCode >= 48) && (event.keyCode <= 57));
}

var prevtop = 0;
var isOpera = (navigator.userAgent.indexOf('Opera') != -1);
var isIE = (!isOpera && navigator.userAgent.indexOf('MSIE') != -1);
var isMZ = (!isOpera && !isIE && navigator.userAgent.indexOf('Mozilla') != -1);
-->